package com.synjones.handsetS8.ild.adapter;

import android.content.Context;
import android.view.View;

import com.synjones.handsetS8.R;;
import com.synjones.handsetS8.ild.adapter.viewholder.SelectItemRvViewHolder;
import com.synjones.handsetS8.ild.base.BaseRecyclerAdapter;
import com.synjones.handsetS8.ild.pages.select.IdNameItem;

import java.util.List;

/**
 * @author Chris Chan
 * Create on: 2021/7/19}16:48
 * For: 字符类型选择列表数据适配器
 * Explain:
 */
public class SelectItemRvAdapter extends BaseRecyclerAdapter<IdNameItem, SelectItemRvViewHolder> {
    public SelectItemRvAdapter(Context context, List<IdNameItem> dataList) {
        super(context, dataList);
    }

    @Override
    protected int layoutId() {
        return R.layout.item_select_item;
    }

    @Override
    protected SelectItemRvViewHolder createViewHolder(View itemView) {
        return new SelectItemRvViewHolder(context, itemView);
    }

    @Override
    protected void refreshItemView(SelectItemRvViewHolder holder, IdNameItem item) {
        holder.refreshView(item);
    }
}
